import React, { Component } from 'react';
import axios from '_axios@0.24.0@axios';
import Item from './component/Item'
class Index extends Component {
    constructor(props){
        super(props);
        this.state={
            top250:[]
        }
    }
    render() {
        return (
            <div>
                <Item data={this.state.top250}></Item>
            </div>
        );
    }
    componentDidMount(){
        axios.get("http://122.112.161.135:4000/api/movie/top250").then(res=>{
            console.log(res);
            this.setState({
                top250:res.data.res
            })
        })
    }
}

export default Index;
